package com.dragon.repository.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dragon.repository.entity.Workflow;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 工作流配置表 Mapper 接口
 * </p>
 *
 * @author sy
 * @since 2023-07-04
 */
@Mapper
public interface WorkflowMapper extends BaseMapper<Workflow> {


    @Select("select dw.*,ddd.name detailName from dragon_workflow dw " +
            "left join dragon_dictsort_detail ddd on dw.type = ddd.id " +
            "${ew.customSqlSegment} " +
            "order by dw.create_time desc")
    Page<Workflow> selectPageList(Page<Workflow> page, @Param(Constants.WRAPPER)Wrapper<Workflow> wrapper);

}
